package jp.ddo.trismegistos.service.impl;

import java.util.List;

import jp.ddo.trismegistos.bean.Entry;
import jp.ddo.trismegistos.dao.EntryDao;
import jp.ddo.trismegistos.service.EntryService;

public class EntryServiceImpl implements EntryService {

	private EntryDao entryDao;

	@Override
	public List<Entry> findEntryByUserId(String userId) {
		return entryDao.findEntryByUserId(userId);
	}

	@Override
	public Entry findEntryByEntryId(String entryId) {
		return entryDao.findEntryByEntryId(entryId);
	}

	public int addEntry(final String userId, final String title,
			final String text) {
		return entryDao.addEntry(userId, title, text);
	}

	public void setEntryDao(final EntryDao entryDao) {
		this.entryDao = entryDao;
	}
}
